#define _CRT_SECURE_NO_WARNINGS
#include"BT.h"
BTNode* BuyNode(int data)
{
	BTNode* newnode = (BTNode*)malloc(sizeof(BTNode));
	if (newnode == NULL)
	{
		perror("malloc fail");
		exit(1);
	}
	newnode->data = data;
	newnode->left = NULL;
	newnode->right = NULL;

	return newnode;
}
BTNode* Create()
{
	BTNode* n1 = BuyNode(1);
	BTNode* n2 = BuyNode(2);
	BTNode* n3 = BuyNode(3);
	BTNode* n4 = BuyNode(4);
	BTNode* n5 = BuyNode(5);
	BTNode* n6 = BuyNode(6);
	BTNode* n7 = BuyNode(7);

	n1->left = n2;
	n1->right = n3;
	n2->left = n4;
	n2->right = n5;
	n3->left = n6;
	n3->right = n7;

	return n1;
}
int main()
{
	BTNode* plist = Create();
	return 0;
}